import java.util.concurrent.atomic.AtomicInteger;

public class Announcements {
    private String[] data;
    private AtomicInteger currentIndex;
    public Announcements(int size) {
        data = new String[size];
        currentIndex = new AtomicInteger(0);
    }
    public String[] getData() {
        return data;
    }

    public int getCurrentIndex() {
        return currentIndex.getAndIncrement() % data.length;
    }

    public void showInfo() {
        for (String s : data) {
            System.out.println(s);
        }
    }
}

